package com.workstudy.workstudy.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.workstudy.workstudy.mapper.WorkstudyAttendancesetMapper;
import com.workstudy.workstudy.domain.WorkstudyAttendanceset;
import com.workstudy.workstudy.service.IWorkstudyAttendancesetService;
import com.workstudy.common.core.text.Convert;

/**
 * 考勤设置Service业务层处理
 * 
 * @author ws
 * @date 2021-03-28
 */
@Service
public class WorkstudyAttendancesetServiceImpl implements IWorkstudyAttendancesetService 
{
    @Autowired
    private WorkstudyAttendancesetMapper workstudyAttendancesetMapper;

    /**
     * 查询考勤设置
     * 
     * @param attendancesetId 考勤设置ID
     * @return 考勤设置
     */
    @Override
    public WorkstudyAttendanceset selectWorkstudyAttendancesetById(Long attendancesetId)
    {
        return workstudyAttendancesetMapper.selectWorkstudyAttendancesetById(attendancesetId);
    }

    /**
     * 查询考勤设置列表
     * 
     * @param workstudyAttendanceset 考勤设置
     * @return 考勤设置
     */
    @Override
    public List<WorkstudyAttendanceset> selectWorkstudyAttendancesetList(WorkstudyAttendanceset workstudyAttendanceset)
    {
        return workstudyAttendancesetMapper.selectWorkstudyAttendancesetList(workstudyAttendanceset);
    }

    /**
     * 新增考勤设置
     * 
     * @param workstudyAttendanceset 考勤设置
     * @return 结果
     */
    @Override
    public int insertWorkstudyAttendanceset(WorkstudyAttendanceset workstudyAttendanceset)
    {
        return workstudyAttendancesetMapper.insertWorkstudyAttendanceset(workstudyAttendanceset);
    }

    /**
     * 修改考勤设置
     * 
     * @param workstudyAttendanceset 考勤设置
     * @return 结果
     */
    @Override
    public int updateWorkstudyAttendanceset(WorkstudyAttendanceset workstudyAttendanceset)
    {
        return workstudyAttendancesetMapper.updateWorkstudyAttendanceset(workstudyAttendanceset);
    }

    /**
     * 删除考勤设置对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteWorkstudyAttendancesetByIds(String ids)
    {
        return workstudyAttendancesetMapper.deleteWorkstudyAttendancesetByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除考勤设置信息
     * 
     * @param attendancesetId 考勤设置ID
     * @return 结果
     */
    @Override
    public int deleteWorkstudyAttendancesetById(Long attendancesetId)
    {
        return workstudyAttendancesetMapper.deleteWorkstudyAttendancesetById(attendancesetId);
    }
}
